import { http } from "@/uni-sub-base/service/request.js"
let serviceName = "WeChat/"
import { getBaseUrl } from "@/utils/appUrls.js"
//使用小程序登录获取openId
export function getMiniProgramOpenId(data, path) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetMiniAppOpenId" + path,
        data,
    })
}

//获取小程序支付参数
export function GetMiniAppPayData(data, path) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetMiniAppPayData" + (path ? path : ""),
        data,
    })
}
//获取原始ID
export function GetMiniAppId(path) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetMiniAppId" + path,
    })
}

export function AESDecrypt(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "AESDecrypt",
        data,
    })
}

export function GetMiniAppPhone(path) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetMiniAppPhone" + path,
    })
}
export function MiniAppOAuthLogin(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "MiniAppOAuthLogin",
        data,
    })
}
